import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class StudentSystem extends JFrame {
    private JMenuBar menuBar;
    private JMenu fileMenu;
    private JMenuItem exitMenuItem;
    private JMenu studentManagementMenu;
    private JMenuItem addStudentMenuItem;
    private JMenuItem deleteStudentMenuItem;
    private JMenuItem modifyStudentMenuItem;
    private JMenuItem displayStudentMenuItem;
    private JMenu courseManagementMenu;
    private JMenuItem addCourseMenuItem;
    private JMenuItem deleteCourseMenuItem;
    private JMenuItem modifyCourseMenuItem;
    private JMenuItem displayCourseMenuItem;
    private JMenu studentCourseGradeManagementMenu;
    private JMenuItem addGradeMenuItem;
    private JMenuItem deleteGradeMenuItem;
    private JMenuItem modifyGradeMenuItem;
    private JMenuItem displayGradeMenuItem;
    public StudentSystem() {

        setTitle("学生成绩管理系统v1.0");

        setSize(1000, 800);

        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        setLayout(new BorderLayout());

        menuBar = new JMenuBar();

        setJMenuBar(menuBar);

        fileMenu = new JMenu("文件");

        menuBar.add(fileMenu);

        exitMenuItem = new JMenuItem("退出");
        exitMenuItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
        fileMenu.add(exitMenuItem);

        studentManagementMenu = new JMenu("学生管理");

        menuBar.add(studentManagementMenu);

        addStudentMenuItem = new JMenuItem("添加学生信息");

        studentManagementMenu.add(addStudentMenuItem);

        deleteStudentMenuItem = new JMenuItem("删除学生信息");

        studentManagementMenu.add(deleteStudentMenuItem);

        modifyStudentMenuItem = new JMenuItem("修改学生信息");

        studentManagementMenu.add(modifyStudentMenuItem);

        displayStudentMenuItem = new JMenuItem("显示学生信息");

        studentManagementMenu.add(displayStudentMenuItem);

        courseManagementMenu = new JMenu("课程管理");

        menuBar.add(courseManagementMenu);


        addCourseMenuItem = new JMenuItem("添加课程信息");

        courseManagementMenu.add(addCourseMenuItem);

        deleteCourseMenuItem = new JMenuItem("删除课程信息");

        courseManagementMenu.add(deleteCourseMenuItem);

        modifyCourseMenuItem = new JMenuItem("修改课程信息");

        courseManagementMenu.add(modifyCourseMenuItem);

        displayCourseMenuItem = new JMenuItem("显示课程信息");

        courseManagementMenu.add(displayCourseMenuItem);

        studentCourseGradeManagementMenu = new JMenu("学生课程成绩管理");

        menuBar.add(studentCourseGradeManagementMenu);


        addGradeMenuItem = new JMenuItem("添加学生课程成绩信息");

        studentCourseGradeManagementMenu.add(addGradeMenuItem);

        deleteGradeMenuItem = new JMenuItem("删除学生课程成绩信息");

        studentCourseGradeManagementMenu.add(deleteGradeMenuItem);

        modifyGradeMenuItem = new JMenuItem("修改学生课程成绩信息");

        studentCourseGradeManagementMenu.add(modifyGradeMenuItem);

        displayGradeMenuItem = new JMenuItem("显示学生课程成绩");

        studentCourseGradeManagementMenu.add(displayGradeMenuItem);

        setVisible(true);
    }
    public static void main(String[] args) {
        new StudentSystem();
    }

}